package cn.yougou.controller;

import cn.yougou.dto.Dto;
import cn.yougou.dto.Query;
import cn.yougou.pojo.YgComment;
import cn.yougou.service.admin.YgAdminCommentService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

/**
 * (ygAdminComment)表控制层
 *
 * @author 白杰崇
 * @since 2020-12-03 01:32:19
 */
@RestController
@RequestMapping("ygAdminComment")
public class YgAdminCommentController {

    @Reference
    private YgAdminCommentService ygAdminCommentService;

    /**
     * 分页查询
     * @param query
     * @return
     */
    @PostMapping("/findAll")
    public Dto findAll(@RequestBody Query query){
        return ygAdminCommentService.findAllByQuery(query);
    }

    /**
     * 逻辑删除
     * @return
     */
    @PostMapping("/delete")
    public Dto delete(@RequestBody YgComment ygComment){
        return ygAdminCommentService.delete(ygComment);
    }



}
